#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
using namespace std;


int main()
{
    string s;
    cout << "输入一个字符串" << endl;
    cin >> s;
    int len = (int) s.length();
    int i;
    for(i = 1; i <= len; i++)
        if (len % i == 0)
        {
            int j, flag = 1;
            for(j = i; j < len; j++) {
                if (s[j] == s[j % i])
                    continue;
                else {
                    flag = 0;
                    break;

                }
            }
            if(flag) {
                cout << i << endl;
                break;

            };
        }
    return 0;
}
